import React, { PureComponent} from 'react';
import {Card} from 'antd';
import {connect} from 'dva';
/**
 *  公共TableauView的实现
 */
class TableauView extends PureComponent<any, any> {

    constructor(props) {
        super(props)
    }

    render() {
        const { dicKey, style, tableauUrl } = this.props;
        return (
            <Card bordered={true}>
            {
                tableauUrl  
                ? <iframe src={tableauUrl} frameBorder='yes' scrolling='auto' id={dicKey} width='100%' {...style}/>
                : <h3 style={{color: 'green'}}>{"加载中..."}</h3>
            }
            </Card>
        )
    }
}
export default connect()(TableauView);